from pydantic import BaseModel, ConfigDict, Field
from pydantic.alias_generators import to_camel
from typing import List, Optional
from module_stock.entity.vo.kline_boll_vo import KlineBollModel

class DivergenceModel(BaseModel):
    """
    股票背离对应pydantic模型
    """
    model_config = ConfigDict(alias_generator=to_camel, from_attributes=True)

    daily_bottoms: Optional[List[KlineBollModel]] = Field(default=[], description='日线底背离')

    weekly_bottoms: Optional[List[KlineBollModel]] = Field(default=[], description='周线底背离')

    monthly_bottoms: Optional[List[KlineBollModel]] = Field(default=[], description='月线底背离')

    daily_tops: Optional[List[KlineBollModel]] = Field(default=[], description='日线顶背离')

    weekly_tops: Optional[List[KlineBollModel]] = Field(default=[], description='周线顶背离')

    monthly_tops: Optional[List[KlineBollModel]] = Field(default=[], description='月线顶背离')
